package com.qf.pojo;/*
 *徐韬
 *2021/10/25
 *20:02
 */

import org.springframework.util.ObjectUtils;

public class TDirtyword implements checkNull {

    private Long id;
    private String dirtyword;
    private Long owntype;
    private Long creater;
    private MyAuthUser myAuthUser;
    private TAdminUser tAdminUser;

    public TAdminUser gettAdminUser() {
        return tAdminUser;
    }

    public void settAdminUser(TAdminUser tAdminUser) {
        this.tAdminUser = tAdminUser;
    }

    public MyAuthUser getMyAuthUser() {
        return myAuthUser;
    }

    public void setMyAuthUser(MyAuthUser myAuthUser) {
        this.myAuthUser = myAuthUser;
    }

    @Override
    public boolean isNull(checkType type) {
        switch (type){
            case UPDATE:
                return ObjectUtils.isEmpty(id) || ObjectUtils.isEmpty(dirtyword);
        }
        return false;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getDirtyword() {
        return dirtyword;
    }

    public void setDirtyword(String dirtyword) {
        this.dirtyword = dirtyword;
    }

    public Long getOwntype() {
        return owntype;
    }

    public void setOwntype(Long owntype) {
        this.owntype = owntype;
    }

    public Long getCreater() {
        return creater;
    }

    public void setCreater(Long creater) {
        this.creater = creater;
    }

    public TDirtyword(Long id, String dirtyword, Long owntype, Long creater) {
        this.id = id;
        this.dirtyword = dirtyword;
        this.owntype = owntype;
        this.creater = creater;
    }

    public TDirtyword() {
    }
}
